package com.base.core.context.utils.dingtalk.bo;

import java.io.Serializable;
import java.util.List;

import com.gitee.magic.core.annotations.Column;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter@Setter@ToString
public class OapiRobotSendBO implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private String msgtype;
	private Text text;
	private At at;
	private Link link;
	private Markdown markdown;
	private ActionCard actionCard;
	private FeedCard feedCard;

	@Getter@Setter@ToString
	public static class Text implements Serializable{
		
		private static final long serialVersionUID = 1L;
		
		private String content;
		
	}

	@Getter@Setter@ToString
	public static class At implements Serializable{
		
		private static final long serialVersionUID = 1L;
		
		@Column("isAtAll")
		private Boolean atAll;
		private List<String> atMobiles;
		private List<String> atUserIds;
		
	}

	@Getter@Setter@ToString
	public static class Link implements Serializable{
		
		private static final long serialVersionUID = 1L;

		private String messageUrl;
		private String title;
		private String picUrl;
		private String text;
	}

	@Getter@Setter@ToString
	public static class Markdown implements Serializable{
		
		private static final long serialVersionUID = 1L;

		private String title;
		private String text;
	}
	
	@Getter@Setter@ToString
	public static class ActionCard implements Serializable{
		
		private static final long serialVersionUID = 1L;
		
		private String hideAvatar;
		private String btnOrientation;
		@Column("singleURL")
		private String singleUrl;
		private String singleTitle;
		private String text;
		private String title;
		private ActionCardBtns btns;

		@Getter@Setter@ToString
		public static class ActionCardBtns implements Serializable{
			
			private static final long serialVersionUID = 1L;
			
			@Column("actionURL")
			private String actionUrl;
			private String title;
			
		}
	}
	
	@Getter@Setter@ToString
	public static class FeedCard implements Serializable{
		
		private static final long serialVersionUID = 1L;
		
		private FeedCardLinks links;

		@Getter@Setter@ToString
		public static class FeedCardLinks implements Serializable{
			
			private static final long serialVersionUID = 1L;
			
			@Column("picURL")
			private String picUrl;
			
			@Column("messageURL")
			private String messageUrl;
			
			private String title;
			
		}
	}
	
}
